<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"	
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:appcc="http://java.sun.com/jsf/composite/components"	
	template="/WEB-INF/layouts/main.xhtml">
	<ui:param name="title" value="login_title" />
	<ui:param name="prependId" value="false" />
	<ui:param name="disableMessages" value="true" />
	<f:metadata>
		<f:viewParam name="session_expired" value="#{loginPageManager.sessionExpired}" />
	</f:metadata>
	<ui:define name="content">
		<p:panel id="loginPanel" header="#{msg.login_header}" styleClass="loginBox">
			<p:focus context="loginPanel"/>
			<h:outputText value="#{msg.login_description}" />
			<h:panelGrid columns="1">
				<appcc:messages id="loginMessages" />
			</h:panelGrid>
			<h:panelGrid columns="2">
				<h:outputLabel for="j_username" value="#{msg.login_login}" styleClass="required" />
				<h:inputText id="j_username" label="#{msg.login_login}" required="true" />
				<h:outputLabel for="j_password" value="#{msg.login_password}" styleClass="required" />
				<h:inputSecret id="j_password" label="#{msg.login_password}" required="true" />
				<p:spacer/>
				<p:commandButton id="login" value="#{msg.login_submit}" action="#{loginPageManager.doLogin()}" icon="ui-icon-circle-check" update="loginMessages" />
			</h:panelGrid>
		</p:panel>
	</ui:define>
</ui:composition>
